home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / ColorSync 2.6 Mac SDK / Documentation / Embedding ICC Profiles Docs / Embedding ICC Profile in Pict < prev    next >
Encoding:
Text File  |  1999-05-07  |  2.1 KB  |  27 lines  |  [TEXT/ttxt]

  1. Embedding ICC Profiles in Pict
  2.  
  3. Apple has defined a new QuickDraw picture comment type for embedded ICC profiles. The picture comment value of 224 is followed by a 4-byte selector that describes the type of data in the comment. Using a selector allows the flexibility to embed more ColorSync related information in the future. The following selectors are currently defined: 
  4.  
  5. Selector    Description
  6.  
  7. 0    Begining of an ICC profile. Profile data to follow.
  8. 1    Continuation of ICC profile data. Profile data to follow.
  9. 2    End of ICC profile data. No profile data follows.
  10.  
  11. Because the dataSize parameter of the PicComment procedure is a signed 16-bit value, the maximum amount of profile data that can be embedded in a single picture comment is 32763 bytes (32767 - 4 bytes for the selector). You can embed a larger profile by using multiple picture comments of selector type 1. The profile data must be embedded in consecutive order, and the last piece of profile data must be followed by a picture comment of selector type 2. 
  12.  
  13. All embedded ICC profiles, including those that fit within a single picture comment, must be followed by the end-of-profile picture comment (selector 2), as shown in the following examples. 
  14.  
  15. Example 1: Embedding a 20K profile.
  16.  
  17. PicComment kind = 224, dataSize = 20K + 4, selector = 0, profile data = 20K PicComment kind = 224, dataSize = 4, selector = 2 
  18.  
  19. Example 2: Embedding a 50K profile.
  20.  
  21. PicComment kind = 224, dataSize = 32K, selector = 0, profile data = 32K - 4 PicComment kind = 224, dataSize = 18K + 8, selector = 1, profile data = 18K + 4 PicComment kind = 224, dataSize = 4, selector = 2 
  22.  
  23. In ColorSync 1.0, picture comment types CMBeginProfile (220) and CMEndProfile (221) are used to begin and end a picture comment. The CMBeginProfile comment is not supported for ICC profiles; however, the CMEndProfile comment can be used to end the current profile and begin using the System Profile for both ColorSync 1.0 and 2.0. 
  24.  
  25. The CMEnableMatching (222) and CMDisableMatching (223) picture comments are used to begin and end color matching in both ColorSync 1.0 and 2.0 
  26.  
  27. See Inside Macintosh: Imaging With QuickDraw for more information about picture comments.